<!doctype html>



  


<html class="theme-next mist use-motion" lang="zh-Hans">
<head>
  <meta charset="UTF-8"/>
<meta http-equiv="X-UA-Compatible" content="IE=edge" />
<meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1"/>



<meta http-equiv="Cache-Control" content="no-transform" />
<meta http-equiv="Cache-Control" content="no-siteapp" />












  
  
  <link href="/lib/fancybox/source/jquery.fancybox.css?v=2.1.5" rel="stylesheet" type="text/css" />




  
  
  
  

  
    
    
  

  

  

  

  

  
    
    
    <link href="//fonts.googleapis.com/css?family=Lato:300,300italic,400,400italic,700,700italic&subset=latin,latin-ext" rel="stylesheet" type="text/css">
  






<link href="/lib/font-awesome/css/font-awesome.min.css?v=4.6.2" rel="stylesheet" type="text/css" />

<link href="/css/main.css?v=5.1.0" rel="stylesheet" type="text/css" />


  <meta name="keywords" content="HTML+CSS," />








  <link rel="shortcut icon" type="image/x-icon" href="/favicon.ico?v=5.1.0" />






<meta name="description" content="Favicon图标 &amp;lt;link rel=&amp;quot;shortcut icon&amp;quot; href=&amp;quot;favicon.ico&amp;quot; /&amp;gt; Float浮动浮动的目的：可以让多个块级 元素 放到一行上 清除浮动清除浮动： 根据情况需要来清楚浮动 。 清除浮动的目的： 就是为了解决 父 盒子高度为0 的问题。">
<meta name="keywords" content="HTML+CSS">
<meta property="og:type" content="article">
<meta property="og:title" content="前端HTML+CSS（一）">
<meta property="og:url" content="http://yoursite.com/2016/11/29/前端HTML-CSS（一）/index.html">
<meta property="og:site_name" content="JokerLiang">
<meta property="og:description" content="Favicon图标 &amp;lt;link rel=&amp;quot;shortcut icon&amp;quot; href=&amp;quot;favicon.ico&amp;quot; /&amp;gt; Float浮动浮动的目的：可以让多个块级 元素 放到一行上 清除浮动清除浮动： 根据情况需要来清楚浮动 。 清除浮动的目的： 就是为了解决 父 盒子高度为0 的问题。">
<meta property="og:locale" content="zh-Hans">
<meta property="og:image" content="http://ohe49035j.bkt.clouddn.com/html1.png">
<meta property="og:image" content="http://ohe49035j.bkt.clouddn.com/html2.png">
<meta property="og:updated_time" content="2016-11-30T10:06:41.702Z">
<meta name="twitter:card" content="summary">
<meta name="twitter:title" content="前端HTML+CSS（一）">
<meta name="twitter:description" content="Favicon图标 &amp;lt;link rel=&amp;quot;shortcut icon&amp;quot; href=&amp;quot;favicon.ico&amp;quot; /&amp;gt; Float浮动浮动的目的：可以让多个块级 元素 放到一行上 清除浮动清除浮动： 根据情况需要来清楚浮动 。 清除浮动的目的： 就是为了解决 父 盒子高度为0 的问题。">
<meta name="twitter:image" content="http://ohe49035j.bkt.clouddn.com/html1.png">



<script type="text/javascript" id="hexo.configurations">
  var NexT = window.NexT || {};
  var CONFIG = {
    root: '/',
    scheme: 'Mist',
    sidebar: {"position":"left","display":"always"},
    fancybox: true,
    motion: true,
    duoshuo: {
      userId: '0',
      author: '博主'
    },
    algolia: {
      applicationID: '',
      apiKey: '',
      indexName: '',
      hits: {"per_page":10},
      labels: {"input_placeholder":"Search for Posts","hits_empty":"We didn't find any results for the search: ${query}","hits_stats":"${hits} results found in ${time} ms"}
    }
  };
</script>



  <link rel="canonical" href="http://yoursite.com/2016/11/29/前端HTML-CSS（一）/"/>





  <title> 前端HTML+CSS（一） | JokerLiang </title>
</head>

<body itemscope itemtype="http://schema.org/WebPage" lang="zh-Hans">

  








  <div style="display: none;">
    <script src="//s95.cnzz.com/z_stat.php?id=1260895995&web_id=1260895995" language="JavaScript"></script>
  </div>





  
  
    
  

  <div class="container one-collumn sidebar-position-left page-post-detail ">
    <div class="headband"></div>

    <header id="header" class="header" itemscope itemtype="http://schema.org/WPHeader">
      <div class="header-inner"><div class="site-meta ">
  

  <div class="custom-logo-site-title">
    <a href="/"  class="brand" rel="start">
      <span class="logo-line-before"><i></i></span>
      <span class="site-title">JokerLiang</span>
      <span class="logo-line-after"><i></i></span>
    </a>
  </div>
  <p class="site-subtitle">永远年轻，永远热泪盈眶。</p>
</div>

<div class="site-nav-toggle">
  <button>
    <span class="btn-bar"></span>
    <span class="btn-bar"></span>
    <span class="btn-bar"></span>
  </button>
</div>

<nav class="site-nav">
  

  
    <ul id="menu" class="menu">
      
        
        <li class="menu-item menu-item-home">
          <a href="/" rel="section">
            
              <i class="menu-item-icon fa fa-fw fa-home"></i> <br />
            
            首页
          </a>
        </li>
      
        
        <li class="menu-item menu-item-categories">
          <a href="/categories" rel="section">
            
              <i class="menu-item-icon fa fa-fw fa-th"></i> <br />
            
            分类
          </a>
        </li>
      
        
        <li class="menu-item menu-item-archives">
          <a href="/archives" rel="section">
            
              <i class="menu-item-icon fa fa-fw fa-archive"></i> <br />
            
            归档
          </a>
        </li>
      
        
        <li class="menu-item menu-item-tags">
          <a href="/tags" rel="section">
            
              <i class="menu-item-icon fa fa-fw fa-tags"></i> <br />
            
            标签
          </a>
        </li>
      

      
        <li class="menu-item menu-item-search">
          
            <a href="javascript:;" class="popup-trigger">
          
            
              <i class="menu-item-icon fa fa-search fa-fw"></i> <br />
            
            搜索
          </a>
        </li>
      
    </ul>
  

  
    <div class="site-search">
      
  <div class="popup">
 <span class="search-icon fa fa-search"></span>
 <input type="text" id="local-search-input">
 <div id="local-search-result"></div>
 <span class="popup-btn-close">close</span>
</div>


    </div>
  
</nav>



 </div>
    </header>

    <main id="main" class="main">
      <div class="main-inner">
        <div class="content-wrap">
          <div id="content" class="content">
            

  <div id="posts" class="posts-expand">
    

  

  
  
  

  <article class="post post-type-normal " itemscope itemtype="http://schema.org/Article">
  <link itemprop="mainEntityOfPage" href="http://yoursite.com/2016/11/29/前端HTML-CSS（一）/">

  <span style="display:none" itemprop="author" itemscope itemtype="http://schema.org/Person">
    <meta itemprop="name" content="JokerLiang">
    <meta itemprop="description" content="">
    <meta itemprop="image" content="/images/me.jpg">
  </span>

  <span style="display:none" itemprop="publisher" itemscope itemtype="http://schema.org/Organization">
    <meta itemprop="name" content="JokerLiang">
    <span style="display:none" itemprop="logo" itemscope itemtype="http://schema.org/ImageObject">
      <img style="display:none;" itemprop="url image" alt="JokerLiang" src="">
    </span>
  </span>

    
      <header class="post-header">

        
        
          <h1 class="post-title" itemprop="name headline">
            
            
              
                前端HTML+CSS（一）
              
            
          </h1>
        

        <div class="post-meta">
          <span class="post-time">
            
              <span class="post-meta-item-icon">
                <i class="fa fa-calendar-o"></i>
              </span>
              <span class="post-meta-item-text">发表于</span>
              <time title="Post created" itemprop="dateCreated datePublished" datetime="2016-11-29T14:05:07+08:00">
                2016-11-29
              </time>
            

            

            
          </span>

          
            <span class="post-category" >
              <span class="post-meta-divider">|</span>
              <span class="post-meta-item-icon">
                <i class="fa fa-folder-o"></i>
              </span>
              <span class="post-meta-item-text">分类于</span>
              
                <span itemprop="about" itemscope itemtype="http://schema.org/Thing">
                  <a href="/categories/前端基本功/" itemprop="url" rel="index">
                    <span itemprop="name">前端基本功</span>
                  </a>
                </span>

                
                
              
            </span>
          

          
            
          

          

          
          

          

          

        </div>
      </header>
    


    <div class="post-body" itemprop="articleBody">

      
      

      
        <h2 id="Favicon&#x56FE;&#x6807;"><a href="#Favicon&#x56FE;&#x6807;" class="headerlink" title="Favicon&#x56FE;&#x6807;"></a>Favicon&#x56FE;&#x6807;</h2><p><img src="http://ohe49035j.bkt.clouddn.com/html1.png" alt="Favicon"></p>
<pre><code>&lt;link rel=&quot;shortcut icon&quot; href=&quot;favicon.ico&quot; /&gt;
</code></pre><h2 id="Float&#x6D6E;&#x52A8;"><a href="#Float&#x6D6E;&#x52A8;" class="headerlink" title="Float&#x6D6E;&#x52A8;"></a>Float&#x6D6E;&#x52A8;</h2><pre><code>&#x6D6E;&#x52A8;&#x7684;&#x76EE;&#x7684;&#xFF1A;&#x53EF;&#x4EE5;&#x8BA9;&#x591A;&#x4E2A;&#x5757;&#x7EA7; &#x5143;&#x7D20; &#x653E;&#x5230;&#x4E00;&#x884C;&#x4E0A;
</code></pre><h2 id="&#x6E05;&#x9664;&#x6D6E;&#x52A8;"><a href="#&#x6E05;&#x9664;&#x6D6E;&#x52A8;" class="headerlink" title="&#x6E05;&#x9664;&#x6D6E;&#x52A8;"></a>&#x6E05;&#x9664;&#x6D6E;&#x52A8;</h2><pre><code>&#x6E05;&#x9664;&#x6D6E;&#x52A8;&#xFF1A; &#x6839;&#x636E;&#x60C5;&#x51B5;&#x9700;&#x8981;&#x6765;&#x6E05;&#x695A;&#x6D6E;&#x52A8; &#x3002;
&#x6E05;&#x9664;&#x6D6E;&#x52A8;&#x7684;&#x76EE;&#x7684;&#xFF1A; &#x5C31;&#x662F;&#x4E3A;&#x4E86;&#x89E3;&#x51B3; &#x7236; &#x76D2;&#x5B50;&#x9AD8;&#x5EA6;&#x4E3A;0 &#x7684;&#x95EE;&#x9898;&#x3002;
</code></pre> <a id="more"></a>
<h3 id="&#x6E05;&#x695A;&#x6D6E;&#x52A8;&#x7684;&#x65B9;&#x6CD5;"><a href="#&#x6E05;&#x695A;&#x6D6E;&#x52A8;&#x7684;&#x65B9;&#x6CD5;" class="headerlink" title="&#x6E05;&#x695A;&#x6D6E;&#x52A8;&#x7684;&#x65B9;&#x6CD5;:"></a>&#x6E05;&#x695A;&#x6D6E;&#x52A8;&#x7684;&#x65B9;&#x6CD5;:</h3><pre><code>1. &#x989D;&#x5916;&#x6807;&#x7B7E;&#x6CD5;&#xFF08;&#x5185;&#x5899;&#x6CD5;&#xFF0C;&#x5916;&#x5899;&#x6CD5;&#xFF09;
2. Overflow: hidden   &#x89E6;&#x53D1; bfc &#x6A21;&#x5F0F; &#x5C31;&#x4E0D;&#x7528;&#x6E05;&#x695A;&#x6D6E;&#x52A8;
3. &#x4F2A;&#x5143;&#x7D20;
</code></pre><h2 id="&#x5B9A;&#x4E49;&#x5217;&#x8868;"><a href="#&#x5B9A;&#x4E49;&#x5217;&#x8868;" class="headerlink" title="&#x5B9A;&#x4E49;&#x5217;&#x8868;"></a>&#x5B9A;&#x4E49;&#x5217;&#x8868;</h2><pre><code>dl&#x8868;&#x793A;definition list &#x5B9A;&#x4E49;&#x5217;&#x8868;
dt&#x8868;&#x793A;definition title    &#x5B9A;&#x4E49;&#x6807;&#x9898;
dd&#x8868;&#x793A;definition description &#x5B9A;&#x4E49;&#x8868;&#x8FF0;&#x8BCD;
</code></pre><p><img src="http://ohe49035j.bkt.clouddn.com/html2.png" alt=""></p>
<h2 id="div&#x548C;Span"><a href="#div&#x548C;Span" class="headerlink" title="div&#x548C;Span"></a>div&#x548C;Span</h2><ul>
<li>&#x8FD9;&#x4E24;&#x4E2A;&#x90FD;&#x662F;CSS&#x975E;&#x5E38;&#x91CD;&#x8981;&#x7684;&#x76D2;&#x5B50;</li>
<li>div&#x7684;&#x8BED;&#x4E49;&#x662F;division&#x201C;&#x5206;&#x5272;&#x201D;&#xFF1B; span&#x7684;&#x8BED;&#x4E49;&#x5C31;&#x662F;span&#x201C;&#x8303;&#x56F4;&#x3001;&#x8DE8;&#x5EA6;&#x201D;</li>
<li>div&#x5728;&#x6D4F;&#x89C8;&#x5668;&#x4E2D;&#xFF0C;&#x9ED8;&#x8BA4;&#x662F;&#x4E0D;&#x4F1A;&#x589E;&#x52A0;&#x4EFB;&#x4F55;&#x7684;&#x6548;&#x679C;&#x6539;&#x53D8;&#x7684;&#xFF0C;&#x4F46;&#x662F;&#x8BED;&#x4E49;&#x53D8;&#x4E86;&#xFF0C;div&#x4E2D;&#x7684;&#x6240;&#x6709;&#x5143;&#x7D20;&#x662F;&#x4E00;&#x4E2A;&#x5C0F;&#x533A;&#x57DF;&#x3002;</li>
<li>span&#x4E5F;&#x662F;&#x8868;&#x8FBE;&#x201C;&#x5C0F;&#x533A;&#x57DF;&#x3001;&#x5C0F;&#x8DE8;&#x5EA6;&#x201D;&#x7684;&#x6807;&#x7B7E;&#xFF0C;&#x4F46;&#x662F;&#x662F;&#x4E00;&#x4E2A;&#x201C;&#x6587;&#x672C;&#x7EA7;&#x201D;&#x7684;&#x6807;&#x7B7E;</li>
<li>&#x5C31;&#x662F;&#x8BF4;&#xFF0C;span&#x91CC;&#x9762;&#x53EA;&#x80FD;&#x653E;&#x7F6E;&#x6587;&#x5B57;&#x3001;&#x56FE;&#x7247;&#x3001;&#x8868;&#x5355;&#x5143;&#x7D20;&#x3002; span&#x91CC;&#x9762;&#x4E0D;&#x80FD;&#x653E;p&#x3001;h&#x3001;ul&#x3001;dl&#x3001;ol&#x3001;div&#x3002;</li>
<li>span&#x91CC;&#x9762;&#x662F;&#x653E;&#x7F6E;&#x5C0F;&#x5143;&#x7D20;&#x7684;&#xFF0C;div&#x91CC;&#x9762;&#x653E;&#x7F6E;&#x5927;&#x4E1C;&#x897F;&#x7684;&#xFF1A;</li>
</ul>
<h2 id="&#x8868;&#x5355;"><a href="#&#x8868;&#x5355;" class="headerlink" title="&#x8868;&#x5355;"></a>&#x8868;&#x5355;</h2><pre><code>&#x8868;&#x5355;&#x5C31;&#x662F;&#x6536;&#x96C6;&#x7528;&#x6237;&#x4FE1;&#x606F;&#x7684;&#xFF0C;&#x5C31;&#x662F;&#x8BA9;&#x7528;&#x6237;&#x586B;&#x5199;&#x7684;&#x3001;&#x9009;&#x62E9;&#x7684;
form&#x662F;&#x82F1;&#x8BED;&#x8868;&#x5355;&#x7684;&#x610F;&#x601D;&#x3002;
form&#x6807;&#x7B7E;&#x91CC;&#x9762;&#x6709;action&#x5C5E;&#x6027;&#x548C;method&#x5C5E;&#x6027;&#xFF0C;action&#x5C5E;&#x6027;&#x5C31;&#x662F;&#x8868;&#x793A;&#xFF0C;&#x8868;&#x5355;&#x5C06;&#x63D0;&#x4EA4;&#x5230;&#x54EA;&#x91CC;&#x3002; 
method&#x5C5E;&#x6027;&#x8868;&#x793A;&#x7528;&#x4EC0;&#x4E48;HTTP&#x65B9;&#x6CD5;&#x63D0;&#x4EA4;&#xFF0C;&#x6709;get&#x3001;post&#x4E24;&#x79CD;&#x3002;
&#x6240;&#x6709;&#x7684;&#x8868;&#x5355;&#x5185;&#x5BB9;&#xFF0C;&#x90FD;&#x8981;&#x5199;&#x5728;form&#x6807;&#x7B7E;&#x91CC;&#x9762;
</code></pre><h2 id="&#x6587;&#x672C;&#x6846;"><a href="#&#x6587;&#x672C;&#x6846;" class="headerlink" title="&#x6587;&#x672C;&#x6846;"></a>&#x6587;&#x672C;&#x6846;</h2><ul>
<li>input&#x8868;&#x793A;&#x201C;&#x8F93;&#x5165;&#x201D;&#xFF0C;&#x6307;&#x7684;&#x662F;&#x8FD9;&#x662F;&#x4E00;&#x4E2A;&#x201C;&#x8F93;&#x5165;&#x5C0F;&#x90E8;&#x4EF6;&#x201D;&#xFF0C;</li>
<li>type&#x8868;&#x793A;&#x201C;&#x7C7B;&#x578B;&#x201D;&#xFF0C;</li>
<li>text&#x8868;&#x793A;&#x201C;&#x6587;&#x672C;&#x201D;&#xFF0C;&#x6307;&#x7684;&#x662F;&#x7C7B;&#x578B;&#x662F;&#x4E00;&#x4E2A;&#x6587;&#x672C;&#x6846;&#x7684;&#x8F93;&#x5165;&#x5C0F;&#x90E8;&#x4EF6;&#x3002;<figure class="highlight plain"><table><tr><td class="gutter"><pre><span class="line">1</span><br><span class="line">2</span><br><span class="line">3</span><br><span class="line">4</span><br><span class="line">5</span><br><span class="line">6</span><br><span class="line">7</span><br><span class="line">8</span><br></pre></td><td class="code"><pre><span class="line">type&#x53EF;&#x9009;&#x7C7B;&#x578B;&#xFF0C;H5&#x4E2D;&#x5C06;&#x4F1A;&#x66F4;&#x591A;</span><br><span class="line">1	text &#x8F93;&#x5165;&#x6846;</span><br><span class="line">2	password &#x5BC6;&#x7801;&#x6846;</span><br><span class="line">3	radio &#x5355;&#x9009;&#x6309;&#x94AE;</span><br><span class="line">4	checkbox &#x590D;&#x9009;&#x6846;</span><br><span class="line">5	button &#x666E;&#x901A;&#x6309;&#x94AE;</span><br><span class="line">6	submit &#x63D0;&#x4EA4;&#x6309;&#x94AE;</span><br><span class="line">7	reset &#x91CD;&#x7F6E;&#x6309;&#x94AE;</span><br></pre></td></tr></table></figure>
</li>
</ul>
<h2 id="&#x4E0B;&#x62C9;&#x83DC;&#x5355;"><a href="#&#x4E0B;&#x62C9;&#x83DC;&#x5355;" class="headerlink" title="&#x4E0B;&#x62C9;&#x83DC;&#x5355;"></a>&#x4E0B;&#x62C9;&#x83DC;&#x5355;</h2><ul>
<li>select&#x5C31;&#x662F;&#x201C;&#x9009;&#x62E9;&#x201D;&#xFF0C;option&#x201C;&#x9009;&#x9879;&#x201D;&#x3002;</li>
<li>select&#x6807;&#x7B7E;&#x548C;ul&#x3001;ol&#x3001;dl&#x4E00;&#x6837;&#xFF0C;&#x90FD;&#x662F;&#x7EC4;&#x6807;&#x7B7E;&#x3002;<br><figure class="highlight html"><table><tr><td class="gutter"><pre><span class="line">1</span><br><span class="line">2</span><br><span class="line">3</span><br><span class="line">4</span><br><span class="line">5</span><br><span class="line">6</span><br><span class="line">7</span><br><span class="line">8</span><br><span class="line">9</span><br></pre></td><td class="code"><pre><span class="line"><span class="tag">&lt;<span class="name">select</span>&gt;</span></span><br><span class="line">	<span class="tag">&lt;<span class="name">option</span>&gt;</span>&#x5317;&#x4EAC;<span class="tag">&lt;/<span class="name">option</span>&gt;</span></span><br><span class="line">	<span class="tag">&lt;<span class="name">option</span>&gt;</span>&#x6CB3;&#x5317;<span class="tag">&lt;/<span class="name">option</span>&gt;</span></span><br><span class="line">	<span class="tag">&lt;<span class="name">option</span>&gt;</span>&#x6CB3;&#x5357;<span class="tag">&lt;/<span class="name">option</span>&gt;</span></span><br><span class="line">	<span class="tag">&lt;<span class="name">option</span>&gt;</span>&#x5C71;&#x4E1C;<span class="tag">&lt;/<span class="name">option</span>&gt;</span>	</span><br><span class="line">	<span class="tag">&lt;<span class="name">option</span>&gt;</span>&#x5C71;&#x897F;<span class="tag">&lt;/<span class="name">option</span>&gt;</span></span><br><span class="line">	<span class="tag">&lt;<span class="name">option</span>&gt;</span>&#x6E56;&#x5317;<span class="tag">&lt;/<span class="name">option</span>&gt;</span></span><br><span class="line">	<span class="tag">&lt;<span class="name">option</span>&gt;</span>&#x5B89;&#x5FBD;<span class="tag">&lt;/<span class="name">option</span>&gt;</span></span><br><span class="line"><span class="tag">&lt;/<span class="name">select</span>&gt;</span></span><br></pre></td></tr></table></figure>
</li>
</ul>
<h2 id="&#x591A;&#x884C;&#x6587;&#x672C;&#x6846;&#xFF08;&#x6587;&#x672C;&#x57DF;&#xFF09;"><a href="#&#x591A;&#x884C;&#x6587;&#x672C;&#x6846;&#xFF08;&#x6587;&#x672C;&#x57DF;&#xFF09;" class="headerlink" title="&#x591A;&#x884C;&#x6587;&#x672C;&#x6846;&#xFF08;&#x6587;&#x672C;&#x57DF;&#xFF09;"></a>&#x591A;&#x884C;&#x6587;&#x672C;&#x6846;&#xFF08;&#x6587;&#x672C;&#x57DF;&#xFF09;</h2><figure class="highlight plain"><table><tr><td class="gutter"><pre><span class="line">1</span><br></pre></td><td class="code"><pre><span class="line">&lt;textarea cols=&quot;30&quot; rows=&quot;10&quot;&gt;&lt;/textarea&gt;</span><br></pre></td></tr></table></figure>
<ul>
<li>&#x8FD9;&#x4E2A;&#x6807;&#x7B7E;&#xFF0C;&#x662F;&#x4E2A;&#x6807;&#x7B7E;&#x5BF9;&#x3002;&#x91CC;&#x9762;&#x4E0D;&#x7528;&#x5199;&#x4E1C;&#x897F;&#x3002;&#x5982;&#x679C;&#x5199;&#x7684;&#x8BDD;&#xFF0C;&#x5C31;&#x662F;&#x8FD9;&#x4E2A;&#x6846;&#x7684;&#x9ED8;&#x8BA4;&#x6587;&#x5B57;&#x3002;</li>
<li>cols&#x5C5E;&#x6027;&#x8868;&#x793A;columns&#x201C;&#x5217;&#x201D;&#xFF0C;rows&#x5C5E;&#x6027;&#x8868;&#x793A;rows&#x201C;&#x884C;&#x201D;&#x3002;</li>
<li>&#x503C;&#x5C31;&#x662F;&#x4E00;&#x4E2A;&#x6570;&#xFF0C;&#x8868;&#x793A;&#x591A;&#x5C11;&#x884C;&#xFF0C;&#x591A;&#x5C11;&#x5217;&#x3002;</li>
</ul>
<h2 id="&#x4E09;&#x79CD;&#x6309;&#x94AE;"><a href="#&#x4E09;&#x79CD;&#x6309;&#x94AE;" class="headerlink" title="&#x4E09;&#x79CD;&#x6309;&#x94AE;"></a>&#x4E09;&#x79CD;&#x6309;&#x94AE;</h2><ul>
<li><p>&#x666E;&#x901A;&#x6309;&#x94AE; </p>
<figure class="highlight html"><table><tr><td class="gutter"><pre><span class="line">1</span><br></pre></td><td class="code"><pre><span class="line"><span class="tag">&lt;<span class="name">input</span> <span class="attr">type</span>=<span class="string">&quot;button&quot;</span> <span class="attr">value</span>=<span class="string">&quot;&#x6211;&#x662F;&#x4E00;&#x4E2A;&#x666E;&#x901A;&#x6309;&#x94AE;&quot;</span> /&gt;</span></span><br></pre></td></tr></table></figure>
</li>
<li><p>&#x63D0;&#x4EA4;&#x6309;&#x94AE;</p>
<figure class="highlight html"><table><tr><td class="gutter"><pre><span class="line">1</span><br><span class="line">2</span><br></pre></td><td class="code"><pre><span class="line"><span class="tag">&lt;<span class="name">input</span> <span class="attr">type</span>=<span class="string">&quot;submit&quot;</span> /&gt;</span></span><br><span class="line">&#x8FD9;&#x4E2A;&#x6309;&#x94AE;&#x70B9;&#x51FB;&#xFF0C;&#x8868;&#x5355;&#x771F;&#x7684;&#x80FD;&#x63D0;&#x4EA4;&#x3002;&#x8FD9;&#x4E2A;&#x8868;&#x5355;&#x5C31;&#x4F1A;&#x88AB;&#x63D0;&#x4EA4;&#x5230;&#xFF0C;form&#x6807;&#x7B7E;&#x7684;action&#x5C5E;&#x6027;&#x4E2D;&#x7684;&#x90A3;&#x4E2A;&#x9875;&#x9762;&#x4E2D;&#x53BB;&#x3002;</span><br></pre></td></tr></table></figure>
</li>
<li><p>&#x91CD;&#x7F6E;&#x6309;&#x94AE;</p>
<figure class="highlight html"><table><tr><td class="gutter"><pre><span class="line">1</span><br></pre></td><td class="code"><pre><span class="line"><span class="tag">&lt;<span class="name">input</span> <span class="attr">type</span>=<span class="string">&quot;reset&quot;</span> /&gt;</span></span><br></pre></td></tr></table></figure>
</li>
</ul>
<h1 id="&#x7528;&#x4EC0;&#x4E48;&#x6807;&#x7B7E;&#xFF0C;&#x4E0D;&#x662F;&#x6839;&#x636E;&#x6837;&#x5B50;&#x6765;&#x51B3;&#x5B9A;&#xFF0C;&#x800C;&#x662F;&#x8BED;&#x4E49;"><a href="#&#x7528;&#x4EC0;&#x4E48;&#x6807;&#x7B7E;&#xFF0C;&#x4E0D;&#x662F;&#x6839;&#x636E;&#x6837;&#x5B50;&#x6765;&#x51B3;&#x5B9A;&#xFF0C;&#x800C;&#x662F;&#x8BED;&#x4E49;" class="headerlink" title="&#x7528;&#x4EC0;&#x4E48;&#x6807;&#x7B7E;&#xFF0C;&#x4E0D;&#x662F;&#x6839;&#x636E;&#x6837;&#x5B50;&#x6765;&#x51B3;&#x5B9A;&#xFF0C;&#x800C;&#x662F;&#x8BED;&#x4E49;"></a>&#x7528;&#x4EC0;&#x4E48;&#x6807;&#x7B7E;&#xFF0C;&#x4E0D;&#x662F;&#x6839;&#x636E;&#x6837;&#x5B50;&#x6765;&#x51B3;&#x5B9A;&#xFF0C;&#x800C;&#x662F;&#x8BED;&#x4E49;</h1>
      
    </div>

    <div>
      
        

      
    </div>

    <div>
      
        

      
    </div>


    <footer class="post-footer">
      
        <div class="post-tags">
          
            <a href="/tags/HTML-CSS/" rel="tag"># HTML+CSS</a>
          
        </div>
      

      
        <div class="post-nav">
          <div class="post-nav-next post-nav-item">
            
              <a href="/2016/11/28/一切都是最好的安排/" rel="next" title="一切都是最好的安排">
                <i class="fa fa-chevron-left"></i> 一切都是最好的安排
              </a>
            
          </div>

          <span class="post-nav-divider"></span>

          <div class="post-nav-prev post-nav-item">
            
              <a href="/2016/11/29/前端HTML-CSS（二）/" rel="prev" title="前端HTML+CSS（二）">
                前端HTML+CSS（二） <i class="fa fa-chevron-right"></i>
              </a>
            
          </div>
        </div>
      

      
      
    </footer>
  </article>



    <div class="post-spread">
      
    </div>
  </div>


          </div>
          


          
  <div class="comments" id="comments">
    
  </div>


        </div>
        
          
  
  <div class="sidebar-toggle">
    <div class="sidebar-toggle-line-wrap">
      <span class="sidebar-toggle-line sidebar-toggle-line-first"></span>
      <span class="sidebar-toggle-line sidebar-toggle-line-middle"></span>
      <span class="sidebar-toggle-line sidebar-toggle-line-last"></span>
    </div>
  </div>

  <aside id="sidebar" class="sidebar">
    <div class="sidebar-inner">

      

      
        <ul class="sidebar-nav motion-element">
          <li class="sidebar-nav-toc sidebar-nav-active" data-target="post-toc-wrap" >
            文章目录
          </li>
          <li class="sidebar-nav-overview" data-target="site-overview">
            站点概览
          </li>
        </ul>
      

      <section class="site-overview sidebar-panel">
        <div class="site-author motion-element" itemprop="author" itemscope itemtype="http://schema.org/Person">
          <img class="site-author-image" itemprop="image"
               src="/images/me.jpg"
               alt="JokerLiang" />
          <p class="site-author-name" itemprop="name">JokerLiang</p>
          <p class="site-description motion-element" itemprop="description">永远年轻，永远热泪盈眶。</p>
        </div>
        <nav class="site-state motion-element">
          <div class="site-state-item site-state-posts">
            <a href="/archives">
              <span class="site-state-item-count">61</span>
              <span class="site-state-item-name">日志</span>
            </a>
          </div>

          
            <div class="site-state-item site-state-categories">
              <a href="/categories">
                <span class="site-state-item-count">15</span>
                <span class="site-state-item-name">分类</span>
              </a>
            </div>
          

          
            <div class="site-state-item site-state-tags">
              <a href="/tags">
                <span class="site-state-item-count">17</span>
                <span class="site-state-item-name">标签</span>
              </a>
            </div>
          

        </nav>

        

        <div class="links-of-author motion-element">
          
            
              <span class="links-of-author-item">
                <a href="https://github.com/LoverJoker" target="_blank" title="GitHub">
                  
                    <i class="fa fa-fw fa-github"></i>
                  
                  GitHub
                </a>
              </span>
            
              <span class="links-of-author-item">
                <a href="https://www.zhihu.com/people/lover-easy-7/activities" target="_blank" title="Twitter">
                  
                    <i class="fa fa-fw fa-twitter"></i>
                  
                  Twitter
                </a>
              </span>
            
              <span class="links-of-author-item">
                <a href="http://weibo.com/2292572142/profile?rightmod=1&wvr=6&mod=personinfo" target="_blank" title="微博">
                  
                    <i class="fa fa-fw fa-globe"></i>
                  
                  微博
                </a>
              </span>
            
          
        </div>

        
        

        
        
          <div class="links-of-blogroll motion-element links-of-blogroll-inline">
            <div class="links-of-blogroll-title">
              <i class="fa  fa-fw fa-globe"></i>
              Friends
            </div>
            <ul class="links-of-blogroll-list">
              
                <li class="links-of-blogroll-item">
                  <a href="http://www.knight.ac.cn/" title="Knight" target="_blank">Knight</a>
                </li>
              
                <li class="links-of-blogroll-item">
                  <a href="http://lzllzl.cn/" title="Zayvion" target="_blank">Zayvion</a>
                </li>
              
                <li class="links-of-blogroll-item">
                  <a href="http://chen97.com/" title="Chens" target="_blank">Chens</a>
                </li>
              
            </ul>
          </div>
        

        


      </section>

      
      <!--noindex-->
        <section class="post-toc-wrap motion-element sidebar-panel sidebar-panel-active">
          <div class="post-toc">

            
              
            

            
              <div class="post-toc-content"><ol class="nav"><li class="nav-item nav-level-2"><a class="nav-link" href="#Favicon图标"><span class="nav-number">1.</span> <span class="nav-text">Favicon图标</span></a></li><li class="nav-item nav-level-2"><a class="nav-link" href="#Float浮动"><span class="nav-number">2.</span> <span class="nav-text">Float浮动</span></a></li><li class="nav-item nav-level-2"><a class="nav-link" href="#清除浮动"><span class="nav-number">3.</span> <span class="nav-text">清除浮动</span></a><ol class="nav-child"><li class="nav-item nav-level-3"><a class="nav-link" href="#清楚浮动的方法"><span class="nav-number">3.1.</span> <span class="nav-text">清楚浮动的方法:</span></a></li></ol></li><li class="nav-item nav-level-2"><a class="nav-link" href="#定义列表"><span class="nav-number">4.</span> <span class="nav-text">定义列表</span></a></li><li class="nav-item nav-level-2"><a class="nav-link" href="#div和Span"><span class="nav-number">5.</span> <span class="nav-text">div和Span</span></a></li><li class="nav-item nav-level-2"><a class="nav-link" href="#表单"><span class="nav-number">6.</span> <span class="nav-text">表单</span></a></li><li class="nav-item nav-level-2"><a class="nav-link" href="#文本框"><span class="nav-number">7.</span> <span class="nav-text">文本框</span></a></li><li class="nav-item nav-level-2"><a class="nav-link" href="#下拉菜单"><span class="nav-number">8.</span> <span class="nav-text">下拉菜单</span></a></li><li class="nav-item nav-level-2"><a class="nav-link" href="#多行文本框（文本域）"><span class="nav-number">9.</span> <span class="nav-text">多行文本框（文本域）</span></a></li><li class="nav-item nav-level-2"><a class="nav-link" href="#三种按钮"><span class="nav-number">10.</span> <span class="nav-text">三种按钮</span></a></li></ol></li><li class="nav-item nav-level-1"><a class="nav-link" href="#用什么标签，不是根据样子来决定，而是语义"><span class="nav-number"></span> <span class="nav-text">用什么标签，不是根据样子来决定，而是语义</span></a></div>
            

          </div>
        </section>
      <!--/noindex-->
      

    </div>
  </aside>


        
      </div>
    </main>

    <footer id="footer" class="footer">
      <div class="footer-inner">
        <div class="copyright" >
  
  &copy; 
  <span itemprop="copyrightYear">2018</span>
  <span class="with-love">
    <i class="fa fa-heart"></i>
  </span>
  <span class="author" itemprop="copyrightHolder">JokerLiang</span>
</div>


<div class="powered-by">
  由 <a class="theme-link" href="https://hexo.io">Hexo</a> 强力驱动
</div>

<div class="theme-info">
  主题 -
  <a class="theme-link" href="https://github.com/iissnan/hexo-theme-next">
    NexT.Mist
  </a>
</div>


        

        
      </div>
    </footer>

    <div class="back-to-top">
      <i class="fa fa-arrow-up"></i>
    </div>
  </div>

  

<script type="text/javascript">
  if (Object.prototype.toString.call(window.Promise) !== '[object Function]') {
    window.Promise = null;
  }
</script>









  



  
  <script type="text/javascript" src="/lib/jquery/index.js?v=2.1.3"></script>

  
  <script type="text/javascript" src="/lib/fastclick/lib/fastclick.min.js?v=1.0.6"></script>

  
  <script type="text/javascript" src="/lib/jquery_lazyload/jquery.lazyload.js?v=1.9.7"></script>

  
  <script type="text/javascript" src="/lib/velocity/velocity.min.js?v=1.2.1"></script>

  
  <script type="text/javascript" src="/lib/velocity/velocity.ui.min.js?v=1.2.1"></script>

  
  <script type="text/javascript" src="/lib/fancybox/source/jquery.fancybox.pack.js?v=2.1.5"></script>


  


  <script type="text/javascript" src="/js/src/utils.js?v=5.1.0"></script>

  <script type="text/javascript" src="/js/src/motion.js?v=5.1.0"></script>



  
  

  
  <script type="text/javascript" src="/js/src/scrollspy.js?v=5.1.0"></script>
<script type="text/javascript" src="/js/src/post-details.js?v=5.1.0"></script>



  


  <script type="text/javascript" src="/js/src/bootstrap.js?v=5.1.0"></script>



  



  




	




  
  
  <script type="text/javascript">
    // Popup Window;
    var isfetched = false;
    // Search DB path;
    var search_path = "search.xml";
    if (search_path.length == 0) {
      search_path = "search.xml";
    }
    var path = "/" + search_path;
    // monitor main search box;

    function proceedsearch() {
      $("body").append('<div class="popoverlay">').css('overflow', 'hidden');
      $('.popup').toggle();
    }
    // search function;
    var searchFunc = function(path, search_id, content_id) {
      'use strict';
      $.ajax({
        url: path,
        dataType: "xml",
        async: true,
        success: function( xmlResponse ) {
          // get the contents from search data
          isfetched = true;
          $('.popup').detach().appendTo('.header-inner');
          var datas = $( "entry", xmlResponse ).map(function() {
            return {
              title: $( "title", this ).text(),
              content: $("content",this).text(),
              url: $( "url" , this).text()
            };
          }).get();
          var $input = document.getElementById(search_id);
          var $resultContent = document.getElementById(content_id);
          $input.addEventListener('input', function(){
            var matchcounts = 0;
            var str='<ul class=\"search-result-list\">';
            var keywords = this.value.trim().toLowerCase().split(/[\s\-]+/);
            $resultContent.innerHTML = "";
            if (this.value.trim().length > 1) {
              // perform local searching
              datas.forEach(function(data) {
                var isMatch = false;
                var content_index = [];
                var data_title = data.title.trim().toLowerCase();
                var data_content = data.content.trim().replace(/<[^>]+>/g,"").toLowerCase();
                var data_url = decodeURIComponent(data.url);
                var index_title = -1;
                var index_content = -1;
                var first_occur = -1;
                // only match artiles with not empty titles and contents
                if(data_title != '') {
                  keywords.forEach(function(keyword, i) {
                    index_title = data_title.indexOf(keyword);
                    index_content = data_content.indexOf(keyword);
                    if( index_title >= 0 || index_content >= 0 ){
                      isMatch = true;
                      if (i == 0) {
                        first_occur = index_content;
                      }
                    }

                  });
                }
                // show search results
                if (isMatch) {
                  matchcounts += 1;
                  str += "<li><a href='"+ data_url +"' class='search-result-title'>"+ data_title +"</a>";
                  var content = data.content.trim().replace(/<[^>]+>/g,"");
                  if (first_occur >= 0) {
                    // cut out 100 characters
                    var start = first_occur - 20;
                    var end = first_occur + 80;
                    if(start < 0){
                      start = 0;
                    }
                    if(start == 0){
                      end = 50;
                    }
                    if(end > content.length){
                      end = content.length;
                    }
                    var match_content = content.substring(start, end);
                    // highlight all keywords
                    keywords.forEach(function(keyword){
                      var regS = new RegExp(keyword, "gi");
                      match_content = match_content.replace(regS, "<b class=\"search-keyword\">"+keyword+"</b>");
                    });

                    str += "<p class=\"search-result\">" + match_content +"...</p>"
                  }
                  str += "</li>";
                }
              })};
            str += "</ul>";
            if (matchcounts == 0) { str = '<div id="no-result"><i class="fa fa-frown-o fa-5x" /></div>' }
            if (keywords == "") { str = '<div id="no-result"><i class="fa fa-search fa-5x" /></div>' }
            $resultContent.innerHTML = str;
          });
          proceedsearch();
        }
      });}

    // handle and trigger popup window;
    $('.popup-trigger').click(function(e) {
      e.stopPropagation();
      if (isfetched == false) {
        searchFunc(path, 'local-search-input', 'local-search-result');
      } else {
        proceedsearch();
      };
    });

    $('.popup-btn-close').click(function(e){
      $('.popup').hide();
      $(".popoverlay").remove();
      $('body').css('overflow', '');
    });
    $('.popup').click(function(e){
      e.stopPropagation();
    });
  </script>


  

  

  

  


</body>
</html>
